Puts the perspective floor’s camera over the picture at (x, y) and turns it to face heading degrees.
Game Boy: not available
Game Boy Color: not available
Sega Genesis: not built yet - The Sega Genesis will draw the road its own way.
On other consoles this differs: see Side by side and How the consoles differ.
perspective_floor_camera(x, y, heading)| Name | Type |
|---|---|
x | real |
y | real |
heading | real |
Nothing.
Puts the perspective floor's camera over the picture at (x, y) and turns it to face heading degrees. It does nothing in a room that has no zoomable background.
x and y are a place on the picture, counted from the picture's top-left corner in the picture's own pixels (a 1024 by 1024 picture runs 0 to 1024 both ways) - not a place on the screen, and not a place in the room.
heading is in degrees, counter-clockwise like every angle in this manual: 0 looks up the picture (toward y = 0), 90 looks left, 180 looks down, 270 looks right. Any number works.
Call it every frame the camera moves. A frame in which nothing changed costs nothing extra.
// Step event of the car: the camera rides 44 pixels behind it, looking where the car looks.
perspective_floor_camera(x + angle_sin(angle) * 44, y + angle_cos(angle) * 44, angle);The car's own place and angle are on the picture; the camera stands behind the car along the line it is facing, so the car is always just ahead of it.
A no-op in a room that has no zoomable background. x and y are places on the picture, counted from its top-left corner in the picture’s own pixels (a 1024 by 1024 picture runs 0 to 1024 both ways). Heading is in degrees, counter-clockwise like every angle in this manual: 0 looks up the picture (toward y = 0), 90 looks left, 180 looks down, 270 looks right. Call it every frame the camera moves; a frame in which nothing changed costs nothing extra.